﻿using B.S.Procurement.Error;
using B.S.Procurement.Read.Api.Application.Command.ExtractionDetailsCommand;
using B.S.Procurement.Read.Api.DTO;
using MediatR;
using Microsoft.AspNetCore.Mvc;

namespace B.S.Procurement.Read.Api.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ExtractionDetailsController : ControllerBase
    {
        private readonly IMediator mediator;

        public ExtractionDetailsController(IMediator mediator)
        {
            this.mediator = mediator;
        }

        /// <summary>
        /// 显示采购退货信息
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<ApiPaging<List<ExtractionDetailsDto>>> QueryExtractionDetails([FromQuery] QueryExtractionModelCommand request)
        {
            return mediator.Send(request);
        }
    }
}
